<div id="navigator_button">
<?
// $quantity 		- 	number of content displayable per page
// $contents_number - 	number of all contents
// $page 			- 	current page
// count($contents) - 	number of contents displayed in current page

$prospection = 6;
$key = $contents_number%$quantity==0? $contents_number/$quantity : floor($contents_number/$quantity)+1;
$start = ($page-$prospection>0)? $page-$prospection : 1;
$end = ($page+$prospection<$key)? $page+$prospection : $key;

if($start>1) echo "... ";
for($i=$start; $i<=$end ; $i++) { 
	if($i==$page)	$class = "current bold ";
	else 			$class = "";
	echo "<span class=\"".$class."page_navigator\"><a href=\"".$base_url.$this_page.$tag_url."/page:".$i."\">".$i."</a></span> ";
}
if($end<$key) echo " ...";

?>
</div>